dotConnect for Oracle Documentation
Devart.Data.Oracle Namespace / OracleDataReader Class / GetProviderSpecificValues Method / GetProviderSpecificValues(Object[]) Method
An array of System.Object into which to copy the column values.
Example

In This Topic
    GetProviderSpecificValues(Object[]) Method
    In This Topic
    Gets all column values for the current row. If possible, a provider-specific type is used.
    Syntax
    'Declaration
     
    Public Overloads Overrides Function GetProviderSpecificValues( _
       ByVal values() As Object _
    ) As Integer
    public override int GetProviderSpecificValues( 
       object[] values
    )

    Parameters

    values
    An array of System.Object into which to copy the column values.

    Return Value

    The number of instances of System.Object in the array.
    Remarks
    This method is equivalent to the GetValues(Object[]) method, the only difference is that this method uses a provider-specific type whenever possible.
    Example
    static void GetMyValues(OracleConnection myConnection) {
      OracleCommand cmd = new OracleCommand("SELECT * FROM Test.Dept");
      cmd.Connection = myConnection;
      myConnection.Open();
      try
      {
        OracleDataReader reader = cmd.ExecuteReader();
        reader.Read();
    
        object[] someValues = new object[5];
        int number = reader.GetProviderSpecificValues(someValues);
    
        for (short i = 0; i < number; i++)
        {
          Console.WriteLine(someValues[i].ToString());
        }
    
        reader.Close();
      }
      finally
      {
        myConnection.Close();
      }
    }
    Shared Sub GetMyValues(ByVal myConnection As OracleConnection)
      Dim cmd As New OracleCommand("SELECT * FROM Test.Dept")
      cmd.Connection = myConnection
      myConnection.Open()
      Try
        Dim reader As OracleDataReader = cmd.ExecuteReader
        reader.Read()
        Dim someValues As Object() = New Object() {}
        Dim number As Integer = reader.GetProviderSpecificValues(someValues)
        For i As Short = 0 To number - 1
          Console.WriteLine(someValues(i).ToString)
        Next i
        reader.Close()
      Finally
        myConnection.Close()
      End Try
    End Sub
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also